import * as util from '../src/util';
import * as components from './components';
import {setLocale} from '../src/locale';
import * as languages from '../src/locale/lang';
const {
	platform,
	theme,
	buildTime,
	version,
}=process.env;
const API={
	util,
	components,
	setLocale,
	languages,
	platform,
	theme,
	buildTime,
	version,
	install(Vue){
		console.log(`%c作者:唐国雄%cPowerfulUi ${version}%c平台:${platform} 主题:${theme}`,
			'background:#35495e;padding:1px 8px;color:#fff;border-radius:3px 0 0 3px;',
			'background:#027BE3;padding:1px 8px;color:#fff;',
			'background:#8219be;padding:1px 8px;color:#fff;border-radius:0 3px 3px 0;'
		);
		const components=this.components;
		for(const key of Object.keys(components)){
			Vue.component('pf'+key,components[key]);
		}
	},
};
if(typeof window!=='undefined'&&window.Vue){
	API.install(window.Vue);
}
export default API;